import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '采购单号',
    align:"center",
    dataIndex: 'purchaseId'
   },
   {
    title: '制单日期',
    align:"center",
    dataIndex: 'makeTime'
   },
   {
    title: '项目id',
    align:"center",
    dataIndex: 'pjId'
   },
   {
    title: '项目名称',
    align:"center",
    dataIndex: 'projectName'
   },
   {
    title: '项目阶段',
    align:"center",
    dataIndex: 'projectStage'
   },
   {
    title: '负责人',
    align:"center",
    dataIndex: 'responsibilityPerson'
   },
   {
    title: '采购金额',
    align:"center",
    dataIndex: 'purchaseMoney'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "制单日期",
      field: "makeTime",
      component: 'DatePicker',
      componentProps: {
         showTime:true,
         valueFormat: 'YYYY-MM-DD HH:mm:ss'
       },
      colProps: {span: 6},
 	},
	{
      label: "项目名称",
      field: "projectName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "负责人",
      field: "responsibilityPerson",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '采购单号',
    field: 'purchaseId',
    component: 'Input',
  },
  {
    label: '制单日期',
    field: 'makeTime',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '项目id',
    field: 'pjId',
    component: 'Input',
  },
  {
    label: '项目名称',
    field: 'projectName',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表单数据
//子表表格配置
